<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>统一社会信用代码生成器</title>
    <link rel="stylesheet" href="../../css/style.css">
    <link rel="stylesheet" href="./credit-code-generator.css">
</head>
<body>
    <button class="theme-toggle" id="themeToggle">🌓</button>
    
    <header class="fixed-header">
        <div class="header-content">
            <a href="../../index.html" class="back-button">
                <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                    <path d="M19 12H5"/>
                    <path d="M12 19l-7-7 7-7"/>
                </svg>
            </a>
            <h1>统一社会信用代码生成器</h1>
            <p>仅供开发测试使用，请勿用于非法用途</p>
        </div>
    </header>

    <div class="container">
        <div class="generator-layout">
            <!-- 表单区域 -->
            <div class="generator-form">
                <div class="form-group">
                    <label for="orgType">机构类型</label>
                    <select id="orgType" required>
                        <option value="1">机构编制</option>
                        <option value="2">外交</option>
                        <option value="3">工商</option>
                        <option value="4">民政</option>
                        <option value="5">司法</option>
                        <option value="9">其他</option>
                    </select>
                </div>
            </div>
            
            <!-- 操作按钮区域 -->
            <div class="button-group">
                <div class="action-buttons">
                    <div class="count-input">
                        <label>生成数量：</label>
                        <input type="number" id="batchCount" min="1" max="100" value="1" class="batch-input" title="生成数量（1-100）">
                    </div>
                    <button id="generate" class="generate-btn">生 成</button>
                    <button id="batchGenerate" class="generate-btn">随机生成</button>
                    <button id="copy" class="copy-btn">复 制</button>
                </div>
            </div>

            <!-- 结果展示区域 -->
            <div class="result-panel">
                <div class="result">
                    <textarea id="creditCode" readonly placeholder="点击生成按钮生成统一社会信用代码" rows="8"></textarea>
                </div>
                <div class="history">
                    <div class="history-header">
                        <h3>生成历史</h3>
                        <button id="clearHistory" class="clear-btn" title="清除历史记录">
                            <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                                <path d="M3 6h18"></path>
                                <path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path>
                                <path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path>
                            </svg>
                        </button>
                    </div>
                    <ul id="historyList"></ul>
                </div>
            </div>
        </div>
    </div>
    <footer class="footer">
        <div class="footer-content">
            <p>仅供开发测试使用，请勿用于非法用途</p>
            <a href="../../index.html" class="back-btn">返回首页</a>
        </div>
    </footer>
    <script src="credit-code-generator.js"></script>
</body>
</html> 